$(window).load(init);

function init(){
	//初始化验证
    formValidate("passwordForm");
    $("#xtqh").val(xtbz);
}

/*
 * 信息弹出框
 */
function changePwd(){
	url = ctx + "/xtwh/rygl/updateXGMM?judge="+1;
	qyOpenPage("修改密码", 500, 280, url);
}
//修改密码操作
function updatePwd(){
	if ($("#passwordForm").valid()) {
		var result = doService(ctx+"/xxwh/user/updatepass","oldpassword",$("#oldpassword").val(),"newpassword",$("#newpassword").val(),"renewpassword",$("#renewpassword").val());
		if(result.messages=="密码修改成功"){
			qyAlert(result.messages, function(){
				qyClose();
			});
		}else{
			qyAlert(result.messages, function(){
				return;
			});
		}
	}
}
function xtqh(){
	var sfww = $("#xtqh").val();
	var result = doService(ctx+"/xxwh/user/xtqh","sfww",sfww);
	window.location.reload(true);
}